<template>
  <div class="head">
    <div class="left">
      <img src="../assets/headlogo.png" style="height:60px;width:60px;" alt="">
          <div style="font-weight: bold;font-size: 22px;margin-left:10px;">柳东分局智慧公安小程序管理平台</div>
    </div>
    <div  class="right">
      <img style="width: 30px; height: 30px;margin-right: 20px;" src="../assets/my.png">
      <el-dropdown @command="handleClick">
       <span class="el-dropdown-link" style="font-size: 22px">

    柳东分局<i class="el-icon-arrow-down el-icon--right"></i>
  </span>
        <el-dropdown-menu slot="dropdown" >
          <el-dropdown-item>个人中心</el-dropdown-item>
          <el-dropdown-item command='cancel'>退出</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>

<script>
export default {
  name: "Header",
  data() {
    return {}
  },
  methods: {
    handleClick(command){
      if(command==='cancel'){
        console.log('退出');
        // Cookie.remove('token');
        // Cookie.remove('menu');
        this.$router.push('/');
      }
    }
  }
};

</script>

<style scoped>
.head{
  width: 100%;
  height: 100% ;
   display: flex;
  justify-content: space-between;
  align-items: center;

}
.left{
  display: flex;
  align-items: center;
}
.right{
  margin-right: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
